package project;

public class MarketInfo {
	private Double open = null;
	private Double close = null;
	private Double current = null;
	private Double change = null;
		
	MarketInfo (Double c, Double ch){
		this.current = c;
		this.change = ch;
	}
	
	MarketInfo(Double o, Double c, Double ch){
		this.open = o;
		this.close = c;
		this.change = ch;
	}
	
	public Double getOpen() {return open;}
	public Double getClose() {return close;}
	public Double getCurrent() {return current;}
	public Double getChange() {return change;}
	
	public void setOpen(Double open) {this.open = open;}
	public void setClose(Double close) {this.close = close;}
	public void setCurrent(Double current) {this.current = current;}
	public void setChange(Double change) {this.change = change;}
	
	/**
	 * Displays the current values parsed from the website onto the console
	 */
	public void showCurrentValues(){
		System.out.println("Current value: " + current);
		System.out.println("Latest change: " + change);
	}
	/**
	 * Displays the final values of the day parsed from the website onto the console 
	 */
	public void showFinalValues(){
		System.out.println("Opening price: " + open);
		System.out.println("Closing price: " + close);
		System.out.println("Total change: " + change);
	}

}
